package com.xd.navi;

import java.util.List;
import java.util.Map;


public class AppHelper {

    /**
     * 判断list是否为空
     *
     * @param list :list
     */
    public static boolean noEmpty(List list) {
        return list != null && !list.isEmpty();
    }

    /**
     * 判断list是否非空
     *
     * @param list :list
     */
    public static boolean isEmpty(List list) {
        return !noEmpty(list);
    }

    /**
     * 判断map是否为空
     *
     * @param map :map
     */
    public static boolean noEmpty(Map map) {
        return map != null && !map.isEmpty();
    }

    /**
     * 判断map是否非空
     *
     * @param map :map
     */
    public static boolean isEmpty(Map map) {
        return !noEmpty(map);
    }
    public static boolean isEquals(Object actual, Object expected) {
        return actual == expected || (actual == null ? expected == null : actual.equals(expected));
    }
}
